<!--
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2023-08-14 19:28:39
 * @LastEditTime: 2023-08-14 19:29:48
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \htmld:\Developer\WGJ\VSCode_WorkSpace\Web\vue\vue-basic\15-内置指令\5.v-pre指令.html
 * @Description:
-->
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>v-pre指令</title>
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
        <!--
            v-pre指令：
                1.跳过其所在节点的编译过程
                2.可利用它跳过：没有使用指令语法、没有使用插值语法的节点，会加快编译
         -->
        <!-- 准备好一个容器 -->
        <div id="root">
            <h2 v-pre>Vue其实很简单</h2>
            <h2>当前的n值是:{{n}}</h2>
            <button @click="n++">点我n+1</button>
        </div>
    </body>
    <script type="text/javascript">
        Vue.config.productionTip = false;

        new Vue({
            el: '#root',
            data: {
                n: 1,
            },
        });
    </script>
</html>
